﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
//using BTGISWASECO.BusinessEntities;

/// <summary>
/// Summary description for VanEntities
/// </summary>
namespace BTGISWASECO.BusinessEntities
{
    public class VanKhachHangEntities
    {
        #region khai bao thuoc tinh
        private int _objectID;
        private string _IDVan;
        private string _IDDMA;
        private int _VatLieu;
        private string _VatLieuText;
        private int _TieuChuanVan;
        private string _TieuChuanVanText;
        private int _NhanHieu;
        private string _NhanHieuText;
        private int _NhaSanXuat;
        private string _NhaSanXuatText;
        private int _NuocSanXuat;
        private string _NuocSanXuatText;
        private int _NamLapDat;
        private double _DoSau;
        private int _ChieuDongVan;
        private string _ChieuDongVanText;
        private double _SVDongVan;
        private string _MoTaViTri;
        private int _TinhTrang;
        private string _TinhTrangText;
        private int _DonViQL;
        private string _DonViQLText;
        private string _CoChiaKhoa;
        private string _SoNha;
        private string _MaDuong;
        private string _MaPhuong;
        private string _MaQuan;
        private int _CoVan;
        private string _CoVanText;
        private string _LoaiVan;
        private string _LoaiVanText;
        private string _GhiChu;

       
        public string LoaiVanText
        {
            get { return _LoaiVanText; }
            set { _LoaiVanText = value; }
        }

        public string LoaiVan
        {
            get { return _LoaiVan; }
            set { _LoaiVan = value; }
        }

        public string MaQuan
        {
            get { return _MaQuan; }
            set { _MaQuan = value; }
        }

        public string MaPhuong
        {
            get { return _MaPhuong; }
            set { _MaPhuong = value; }
        }

        public string MaDuong
        {
            get { return _MaDuong; }
            set { _MaDuong = value; }
        }
        public string CoVanText
        {
            get { return _CoVanText; }
            set { _CoVanText = value; }
        }


        public int CoVan
        {
            get { return _CoVan; }
            set { _CoVan = value; }
        }

        public string NhanHieuText
        {
            get { return _NhanHieuText; }
            set { _NhanHieuText = value; }
        }

        public int NhanHieu
        {
            get { return _NhanHieu; }
            set { _NhanHieu = value; }
        }


        public string MoTaViTri
        {
            get { return _MoTaViTri; }
            set { _MoTaViTri = value; }
        }

        public string CoChiaKhoa
        {
            get { return _CoChiaKhoa; }
            set { _CoChiaKhoa = value; }
        }


        public string SoNha
        {
            get { return _SoNha; }
            set { _SoNha = value; }
        }

        public string NhaSanXuatText
        {
            get { return _NhaSanXuatText; }
            set { _NhaSanXuatText = value; }
        }


        public string DonViQLText
        {
            get { return _DonViQLText; }
            set { _DonViQLText = value; }
        }


        public string TinhTrangText
        {
            get { return _TinhTrangText; }
            set { _TinhTrangText = value; }
        }

        public string NuocSanXuatText
        {
            get { return _NuocSanXuatText; }
            set { _NuocSanXuatText = value; }
        }


        public string TieuChuanVanText
        {
            get { return _TieuChuanVanText; }
            set { _TieuChuanVanText = value; }
        }

        public string VatLieuText
        {
            get { return _VatLieuText; }
            set { _VatLieuText = value; }
        }


        public int ChieuDongVan
        {
            get { return _ChieuDongVan; }
            set { _ChieuDongVan = value; }
        }

        public string ChieuDongVanText
        {
            get { return _ChieuDongVanText; }
            set { _ChieuDongVanText = value; }
        }

        public int NhaSanXuat
        {
            get { return _NhaSanXuat; }
            set { _NhaSanXuat = value; }
        }


        public string GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }


        public int DonViQL
        {
            get { return _DonViQL; }
            set { _DonViQL = value; }
        }

        public int TinhTrang
        {
            get { return _TinhTrang; }
            set { _TinhTrang = value; }
        }


        public double DoSau
        {
            get { return _DoSau; }
            set { _DoSau = value; }
        }


        public int NamLapDat
        {
            get { return _NamLapDat; }
            set { _NamLapDat = value; }
        }

        public int NuocSanXuat
        {
            get { return _NuocSanXuat; }
            set { _NuocSanXuat = value; }
        }

        public int TieuChuanVan
        {
            get { return _TieuChuanVan; }
            set { _TieuChuanVan = value; }
        }
        
        public int VatLieu
        {
            get { return _VatLieu; }
            set { _VatLieu = value; }
        }
        
        public int OBJECTID
        {
            get { return _objectID; }
            set { _objectID = value; }
        }

        public string IDVan
        {
            get { return _IDVan; }
            set { _IDVan = value; }
        }

        public string IDDMA
        {
            get { return _IDDMA; }
            set { _IDDMA = value; }
        }

        public double SVDongVan
        {
            get { return _SVDongVan; }
            set { _SVDongVan = value; }
        }

        # endregion khai bao

        #region phuong thuc

        public VanKhachHangEntities()
        {

        }

        public VanKhachHangEntities(string IDVan, string IDDMA,
         int VatLieu, int TieuChuanVan,
         int NhanHieu, int NhaSanXuat, int NuocSanXuat, int NamLapDat,
         double DoSau, int ChieuDongVan, double SVDongVan,
         string MoTaViTri, int TinhTrang, int DonViQL,
         string CoChiaKhoa, string SoNha, string MaDuong,
         string MaPhuong, string MaQuan, int CoVan,
         string LoaiVan, string GhiChu)
        {
            //Begin Ninh Thuan
            this._IDVan = IDVan;
            this._IDDMA = IDDMA;
            this._VatLieu = VatLieu;
            this._TieuChuanVan = TieuChuanVan;
            this._NhanHieu = NhanHieu;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NamLapDat = NamLapDat;
            this._DoSau = DoSau;
            this._ChieuDongVan = ChieuDongVan;
            this._SVDongVan = SVDongVan;
            this._MoTaViTri = MoTaViTri;
            this._TinhTrang = TinhTrang;
            this._DonViQL = DonViQL;
            this._CoChiaKhoa = CoChiaKhoa;
            this._SoNha = SoNha;
            this._MaDuong = MaDuong;
            this._MaPhuong = MaPhuong;
            this._MaQuan = MaQuan;
            this._CoVan = CoVan;
            this._LoaiVan = LoaiVan;
            this._GhiChu = GhiChu;
        }
        public VanKhachHangEntities(int OBJECTID, string IDVan, string IDDMA,
         int VatLieu, int TieuChuanVan,
         int NhanHieu, int NhaSanXuat, int NuocSanXuat, int NamLapDat,
         double DoSau, int ChieuDongVan, double SVDongVan,
         string MoTaViTri, int TinhTrang, int DonViQL,
         string CoChiaKhoa, string SoNha, string MaDuong,
         string MaPhuong, string MaQuan, int CoVan,
         string LoaiVan, string GhiChu)
        {
            this._objectID = OBJECTID;
            //Begin Ninh Thuan
            this._IDVan = IDVan;
            this._IDDMA = IDDMA;
            this._VatLieu = VatLieu;
            this._TieuChuanVan = TieuChuanVan;
            this._NhanHieu = NhanHieu;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NamLapDat = NamLapDat;
            this._DoSau = DoSau;
            this._ChieuDongVan = ChieuDongVan;
            this._SVDongVan = SVDongVan;
            this._MoTaViTri = MoTaViTri;
            this._TinhTrang = TinhTrang;
            this._DonViQL = DonViQL;
            this._CoChiaKhoa = CoChiaKhoa;
            this._SoNha = SoNha;
            this._MaDuong = MaDuong;
            this._MaPhuong = MaPhuong;
            this._MaQuan = MaQuan;
            this._CoVan = CoVan;
            this._LoaiVan = LoaiVan;
            this._GhiChu = GhiChu;
        }

        public VanKhachHangEntities(DataRow row)
        {
            this._objectID = Convert.ToInt32(row["OBJECTID"]);
            this._IDVan = row["IDMaVan"].ToString();
            this._IDDMA = row["IDCapNuoc"].ToString();
            this._VatLieuText = row["VatLieu"].ToString();
            if (row["TieuChuan"]!=null)
            this._TieuChuanVanText = row["TieuChuan"].ToString();
            this._NhanHieuText = row["Hieu"].ToString();
            this._NhaSanXuatText = row["NhaSanXuat"].ToString();
            this._NuocSanXuatText = row["NuocSanXuat"].ToString();
            if (row["NamLapDat"].ToString() != "Null")
                this._NamLapDat = Convert.ToInt32(row["NamLapDat"]);
            if (row["DoSau"].ToString() != "Null")
                this._DoSau = Convert.ToDouble(row["DoSau"]);
            this._ChieuDongVanText = row["ChieuDongVan"].ToString();
            if (row["SVDongVan"].ToString() != "Null")
                this._SVDongVan = Convert.ToDouble(row["SVDongVan"]);
            this._MoTaViTri = row["ViTriVan"].ToString();
            this._TinhTrangText = row["TinhTrang"].ToString();
            //if (row["DonViQL"].ToString() != "Null")
            this._DonViQLText = row["DonViQuanLy"].ToString();
            this._CoChiaKhoa = row["CoChiaKhoa"].ToString();
            this._SoNha = row["SoNha"].ToString();
            this._MaDuong = row["MaDuong"].ToString();
            this._MaPhuong = row["MaPhuong"].ToString();
            this._MaQuan = row["MaQuan"].ToString();
            this._CoVanText = row["CoVan"].ToString();
            this._LoaiVanText = row["LoaiVan"].ToString();        
            this._GhiChu = row["GhiChu"].ToString();
        }


        //public VanEntities VanIDataReader(IDataReader dr)
        //{
        //    BTGISWASECO.BusinessEntities.VanEntities obj = new BTGISWASECO.BusinessEntities.VanEntities();
        //    obj._objectID = (dr["ObjectID"] is DBNull) ? -1 : Convert.ToInt32(dr["ObjectID"]);
        //    obj._IDVan = (dr["IDVan"] is DBNull) ? string.Empty : dr["_IDVan"].ToString();
        //    obj._IDDMA = (dr["IDDMA"] is DBNull) ? string.Empty : dr["_IDDMA"].ToString();
        //    obj._ChieuDongVan = (Convert.ToInt32(dr["ChieuDongVan"]) >= 0) ? 0 : Convert.ToInt32(dr["ChieuDongVan"]);
        //    obj._SVDongVan = (dr["SVDongVan"] is DBNull) ? 0 : Convert.ToInt32(dr["SVDongVan"]);
        //    return obj;
        //}

        #endregion phuong thuc
    }
}